package com.yihusitian.zsxq.sg.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import java.util.List;

/**
 * @Description 表配置信息
 * @Author LeeHo
 * @Date 2020/8/26 10:28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@XmlRootElement(name = "tables")
public class TablesInfo {

    @XmlAttribute
    private String database;

    @XmlAttribute
    private String defaultReplacePrefix;

    @XmlElement(name = "table")
    private List<TableInfo> tables;

    @XmlTransient
    public String getDatabase() {
        return database;
    }

    @XmlTransient
    public String getDefaultReplacePrefix() {
        return defaultReplacePrefix;
    }

    @XmlTransient
    public List<TableInfo> getTables() {
        return tables;
    }
}